package com.example.mushroom.service.impl;

import com.example.mushroom.entity.AlertLog;
import com.example.mushroom.mapper.AlertLogMapper;
import com.example.mushroom.service.AlertLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

@Service
public class AlertLogServiceImpl implements AlertLogService {

    @Autowired
    private AlertLogMapper alertLogMapper;

    @Override
    public int insertAlertLog(AlertLog alertLog) {
        return alertLogMapper.insertAlertLog(alertLog);
    }

    @Override
    public AlertLog selectAlertLogById(Integer id) {
        return alertLogMapper.selectAlertLogById(id);
    }

    @Override
    public List<AlertLog> selectAllAlertLogs() {
        return alertLogMapper.selectAllAlertLogs();
    }

    @Override
    public int updateAlertLog(AlertLog alertLog) {
        return alertLogMapper.updateAlertLog(alertLog);
    }

    @Override
    public int deleteAlertLogById(Integer id) {
        return alertLogMapper.deleteAlertLogById(id);
    }

    @Override
    public List<AlertLog> selectAlertLogsByPage(int offset, int limit) {
        return alertLogMapper.selectAlertLogsByPage(offset, limit);
    }
}